package samples.spring.anotation;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import samples.spring.service.HelloWorldService;

/**
 * @author Zi Lai Ye
 * @date 2017/3/29
 */
public class SpringAnotationApp {

    private static final Logger logger = LoggerFactory.getLogger(SpringAnotationApp.class);

    public static void main(String[] args) {
        ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext("anotationContext.xml");

        HelloWorldService helloWorldService = appContext.getBean(HelloWorldService.class);
        String wangyuchuan = helloWorldService.sayHello("wangyuchuan");
        logger.trace("sayHello:{}", wangyuchuan);
    }
}
